export const getUserInfo = () => {
    let userInfo = localStorage.getItem('userInfo');
    return JSON.parse(userInfo)
}

export const getToken = () => {
    return  localStorage.getItem('token');
}

export const saveToken = val => localStorage.setItem('token',val);
export const saveUserInfo = val => localStorage.setItem('userInfo',val);

export const removeUserInfo = ()=> localStorage.removeItem('userInfo');
export const removeToken = ()=> localStorage.removeItem('token');